#ifndef HAVE_TEXT2XML_VECTOR_H
#define HAVE_TEXT2XML_VECTOR_H

#ifdef __cplusplus
extern "C" {
#endif
  typedef void** Vector;

  /**
   * Returns a new vector.
   */
  Vector* vector_new(size_t size);

  /**
   * Destroys the vector.
   */
  void vector_free(Vector* vector);

  /**
   * Adds the given item at the nth position.
   */
  void vector_set(Vector* vector, long n, void* value);

  /**
   * Returns the item from the nth position. Returns NULL
   * if the item does not exist.
   */
  void* vector_get(Vector* vector, long n);

  /**
   * Deletes the item at the nth position.
   */
  Vector* vector_delete(Vector* vector, long n);

  /**
   * Returns the number of elements in the specified vector.
   * FIXME: Not yet supported because a vector is void**.
   */
  /*int vector_length(Vector* vector);*/
#ifdef __cplusplus
}
#endif                          /* __cplusplus */

#include "VectorIter.h"

#endif                          /* HAVE_TEXT2XML_VECTOR_H */
